package com.wwy.hkapi.HKApi;

import com.wwy.hkapi.HKApi.callBack.MyRealDataCallBack_V30;
import com.wwy.hkapi.HKApi.init.HkInit;

/**
 * 视频预览
 * @Author: wwy
 * @Date: 2022/6/14 14:44
 */
public class HkRealPlay {
    private static HCNetSDK.FRealDataCallBack_V30 myRealDataCallBack_v30 = new MyRealDataCallBack_V30();

    /**
     * 开始预览
     * @param userId
     * @param lChannel
     * @param dwStreamType
     */
    public void preview(int userId,int lChannel,int dwStreamType){
        HCNetSDK.NET_DVR_PREVIEWINFO net_dvr_previewinfo = new HCNetSDK.NET_DVR_PREVIEWINFO();
        net_dvr_previewinfo.lChannel = lChannel;
        net_dvr_previewinfo.dwStreamType = dwStreamType;
        HkInit.hCNetSDK.NET_DVR_RealPlay_V40(userId,net_dvr_previewinfo,myRealDataCallBack_v30,null);
    }

    /**
     * 关闭预览
     * @param userId
     */
    public void stop(int userId){
        HkInit.hCNetSDK.NET_DVR_StopRealPlay(userId);
    }
}
